from .models import *
from rest_framework import serializers


class TatlrSer(serializers.ModelSerializer):
    tat_name = serializers.SerializerMethodField()

    def get_tat_name(self, obj):
        return obj.taste.name

    class Meta:
        models = Dishes_Taste
        fields = '__all__'